package com.charm.watercress.adapter

import android.widget.ImageView
import android.widget.TextView
import com.chad.library.adapter.base.BaseViewHolder
import com.charm.codes.imageLoad.XGlide
import com.charm.frameworkarou.recycleadapter.QuickRecyAdapter
import com.charm.watercress.R
import com.charm.watercress.entity.VideoUrlsBean

/**
 * Created by tools on 2018/1/12.
 */
class VideosAdapter(list: List<String>?) : QuickRecyAdapter<String>(list) {
    override fun convert(helper: BaseViewHolder?, item: String?) {
        var image = helper!!.getView<ImageView>(R.id.image)
        XGlide.getInstance().with(mContext)
                .load(item)
                .placeholder(R.drawable.bg_block)
                .error(R.drawable.bg_block)
                .into(image)
                .displayImage()
    }

    override fun getLayoutResId(): Int {
        return R.layout.item_actors
    }

}